package com.atguigu.springcloud.alibaba.controller;

import com.atguigu.springcloud.alibaba.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author timiv
 */
@RestController
public class StorageController {

    @Autowired
    private StorageService service;

    @PostMapping("/storage/sub")
    public void subStorage(@RequestParam("productId") Long productId, @RequestParam("count") Integer count){
        service.subStorage(productId, count);
    }
}
